<tagLib name="html" />
<include file="Public:header" />
<load href ="__PUBLIC__/Js/common.js" />
<load href ="__PUBLIC__/Js/jquery-1.4.4.min.js" />
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/Js/editor/kindeditor.js"></script>
<script type="text/javascript">
    KE.show({
        id : 'traffic_1'
   });
   KE.show({
        id : 'community_1'
   });
   KE.show({
        id : 'around_1' //TEXTAREA输入框的ID
   });
   function addRowplus(tablename){
				var tablename = tablename;
				var trstr = jQuery("#"+tablename).find("tr").eq(0).html();
				var pattern = /value=[a-zA-Z0-9_]*/ig;
				trstr = trstr.replace(pattern,'');
				trstr = "<tr>"+trstr+"</tr>";
				jQuery('#'+tablename).append(trstr);
			}
    function removerow(obj){
		var objnum = jQuery(obj).parent().parent().parent().children().size();
		if(objnum>1)
		{
                    jQuery(obj).parent().parent().remove();
		}
   }
</script>
<div id="main" class="main" >
<div class="content">
<div class="title">新增酒店 [ <a href="__URL__">返回列表</a> ]</div>
<form method='post' id="form1" action="__URL__/insert/" enctype="multipart/form-data">
<table cellpadding=3 cellspacing=3>
 <tr>
	<td></td>
	<td style="float:right">
            <input type="submit" value="新 增" class="small submit">
            <input type="reset" class="reset imgButton" onclick="javascript:history.back()" value="返回" >
	</td>
</tr>
<tr>
	<td class="tRight" >公寓名称：</td>
	<td class="tLeft" >
            <input type="text" class="medium bLeftRequire"  check='Require' warning="公寓名不能为空" id="name" name="name" value="">
        </td>
</tr>
<tr>
    <td class="tRight" >小区情况：</td>
    <td class="tLeft" >
            <textarea class="large bLeft"  id="community_1" name="community" style="width:650px;height:200px;"></textarea>
        </td>
</tr>

<tr>
	<td class="tRight" >周边介绍：</td>
	<td class="tLeft" >
            <textarea class="large bLeft"  id="around_1" name="around" style="width:650px;height:200px;"></textarea>
        </td>
</tr>
<tr>
    <td class="tRight" >交通情况：</td>
    <td class="tLeft" >
            <textarea class="large bLeft"  id="traffic_1" name="traffic" style="width:650px;height:200px;"></textarea>
        </td>
</tr>

<tr>
	<td class="tRight" >产品图片：</td>
	<td class="tLeft" bgcolor="whiteSmoke">
            默认图片<input type="file" class="large bLeft" name="logo">(必须上传)<br />

            其他图片：<table id="attach_pic">
		<tr class="firstline">
                    <td width="60%"><input type="file" class="large bLeft" name="attach[]">
                    排序:<input id="" type="text" name="pic_sort[]" />
</td>
                    <td><img src="__PUBLIC__/Images/publish_x.png" alt="删除" onclick="removerow(this);"/></td>
                </tr>
            </table>
            <a href="javascript:void(0)" onclick="addRowplus('attach_pic');" class="addMore">添加更多</a>
        </td>
</tr>
<tr>
	<td class="tRight" >地址：</td>
	<td class="tLeft" >{$vo.prov_code|makeProvince}{$vo.city_code|makeCity} {$vo.coun_code|makeCountry} <input type="text" class="large bLeft" name="address" value=""></td>
</tr>

<tr>
	<td class="tRight" >经度：</td>
	<td class="tLeft" ><input type="text" class="medium bLeft" name="longitude" value=""></td>
</tr>
<tr>
	<td class="tRight" >纬度：</td>
	<td class="tLeft" ><input type="text" class="medium bLeft" name="latitude" value=""></td>
</tr>
<tr>
	<td class="tRight" >所在区（暂取上海）：</td>
	<td class="tLeft" >
            <select name="district">
                <volist name="shdistrict" id="dis">
                <option value="{$key}">{$dis}</option>
                </volist>
            </select>
        </td>
</tr>
<tr>

    <td class="tRight" >排序：</td>
	<td class="tLeft" ><input type="text" class="medium bLeft" name="sort" value="">数值越小越靠前</td>
</tr>
<tr>

    <td class="tRight" >类型：</td>
    <td class="tLeft" >
        <SELECT class="big bLeft"  name="type">
            <option value="1">直营房源</option>
            <option value="0">联盟房源</option>
        </SELECT>
    </td>
</tr>
<tr>
    <td class="tRight">SEO标题优化：</td>
    <td class="tLeft">
            标题：<input type="text" name="meta_title" value="{$vo.meta_title}" class="huge"> <br/>
            关键词：<input type="text" name="meta_keywords" value="{$vo.meta_keywords}" class="huge"><br/>
            描述：<input type="text" name="meta_description" value="{$vo.meta_description}" class="huge">
        </td>
</tr>
<tr>
	<td class="tRight">状态：</td>
	<td class="tLeft"><SELECT class="small bLeft"  name="status">
	<option value="1">启用</option>
	<option value="0">禁用</option>
	</SELECT></td>
</tr>

<tr>
	<td></td>
	<td class="center">
	<input type="submit" value="保 存" class="small submit">
	<input type="reset" class="reset imgButton" onclick="javascript:history.back()" value="返回" >
	</td>
</tr>
</table>
</form>
</div>
</div>
